package com.openbravo.pos.util;

public class LuhnAlgorithm
{
  public static boolean checkCC(String paramString)
  {
    int i = 0;
    int j = 0;
    if (!StringUtils.isNumber(paramString))
      return false;
    for (int k = paramString.length() - 1; k >= 0; k--)
    {
      int m = Character.digit(paramString.charAt(k), 10);
      j++;
      if (j % 2 == 0)
      {
        m *= 2;
        if (m > 9)
          m -= 9;
      }
      i += m;
    }
    return i % 10 == 0;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.util.LuhnAlgorithm
 * JD-Core Version:    0.6.0
 */